#ifndef DEVICESMEM_H_INCLUDED
#define DEVICESMEM_H_INCLUDED

#include "stdint.h"

/* 模拟动态内存大小 */
#define DEVICES_MEM_LENGTH          (1024 * 1)

/* 字节对齐（至少要4字节对齐） */
#define DEVICES_MEM_ROUNDUP_VALUE   8


typedef struct{
    int32_t startAddr: 30;
    int32_t stopAddr: 30;
    uint32_t state: 2;
}MemType;


void vMemInit(void);
void *pvMemMalloc(int32_t iSize);
void *pvMemCalloc(int32_t iNumber, int32_t iSize);
void *pvMemRealloc(void *pvMemAddr, int32_t iSize);
void vMemFree(void *pvMemAddr);

#endif // DEVICESMEM_H_INCLUDED
